package com.landscope.issue.controller.wx;

import com.landscope.issue.controller.base.ResponseResult;
import com.landscope.issue.controller.wx.dto.AppletMainMessageDto;
import com.landscope.issue.controller.wx.param.AppletMainGetNoticeParam;
import com.landscope.issue.service.applet.ApiAppletMainService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RequestMapping("api/applet/main")
@RestController
@Api(tags = "5.小程序-首页")
@CrossOrigin
public class ApiAppletMainController {

    @Resource
    private ApiAppletMainService apiAppletMainService;

    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", name = "token", value = "token", dataType = "String")
    })
    @ApiOperation(value = "5.1 获取置顶消息和系统通知数量",notes = "获取置顶消息和系统通知数量")
    @PostMapping("/message")
    public ResponseResult<AppletMainMessageDto> message(@RequestBody AppletMainGetNoticeParam param){
        return apiAppletMainService.message(param);
    }
}
